﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="PromeniPodatociVinarija.aspx.cs" Inherits="PromeniPodatociVinarija" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    </div>
    <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" DataSourceID="SqlDataSource1"
        GridLines="None" AutoGenerateColumns="False" DataKeyNames="IDVinarija">
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <Columns>
            <asp:CommandField ShowEditButton="True" />
            <asp:CommandField ShowDeleteButton="True" />
            <asp:BoundField DataField="IDVinarija" HeaderText="IDVinarija" />
            <asp:BoundField DataField="Ime" HeaderText="Ime" 
                SortExpression="Ime" />
            <asp:BoundField DataField="Adresa" HeaderText="Adresa" 
                SortExpression="Adresa" />
            <asp:BoundField DataField="email" HeaderText="email" 
                SortExpression="email" />
            <asp:BoundField DataField="telefon" HeaderText="telefon" 
                SortExpression="telefon" />
            <asp:BoundField DataField="grad" HeaderText="grad" 
                SortExpression="grad" />
            <asp:BoundField DataField="webstrana" HeaderText="webstrana" 
                SortExpression="webstrana" />
        </Columns>
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <EditRowStyle BackColor="#999999" />
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
    </asp:GridView>
    
     <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Vinarii.mdb;"  
            ProviderName="System.Data.OleDb" 
            SelectCommand="SELECT IDVinarija, Ime, Adresa, email, telefon, grad, webstrana  FROM [Vinarija]"
            UpdateCommand="UPDATE Vinarija SET Ime=@Ime, Adresa=@Adresa, email=@email, telefon=@telefon, grad=@grad, webstrana=@webstrana WHERE(IDVinarija = @IDVinarija)"
            DeleteCommand="DELETE from Vinarija WHERE IDVinarija=@IDVinarija"
            >
        </asp:SqlDataSource>
    </form>
</body>
</html>
